package com.mall.domain.po;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @description: 订单详情实体
 * @author 勾新杰
 * @version 1.0
 * @date 2024/11/25 14:02
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "订单详情实体")
public class OrderItem {
    @Schema(description = "订单详情id")
    private Long id;
    @Schema(description = "订单id")
    private Long orderId;
    @Schema(description = "商品id")
    private Long itemId;
    @Schema(description = "商品数量")
    private Integer quantity;
    @Schema(description = "商品单价")
    private Double price;
    @Schema(description = "商品小计总价")
    private Double subtotal;
    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @Schema(description = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
